# Maintainer: Dekedro <dekedro@protonmail.com>
pkgname=go-mtpfs
pkgver=1.0.0
pkgrel=19
pkgdesc="Mount MTP devices over FUSE"
url="https://github.com/hanwen/go-mtpfs"
arch="all"
license="BSD-3-Clause"
makedepends="go libusb-dev"
options="net !check" # tests require MTP device to be connected
source="$pkgname-$pkgver.tar.gz::https://github.com/hanwen/go-mtpfs/archive/refs/tags/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build
}

package() {
	install -Dm755 "$builddir"/go-mtpfs "$pkgdir"/usr/bin/go-mtpfs
}

sha512sums="
b66d4f3179f95a7137cdc921fc171a260d23c4d003bd680b92791b6aab79484c75dd3a5ec39129d42b52822b95711f98438900033da4aedecc7c6dc5e0f6a834  go-mtpfs-1.0.0.tar.gz
"
